Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the maximum number of requests which can issued concurrently to the chain #3350

Merged
merged 3 commits into from
May 23, 2023

Conversation

romac
Copy link
Member

@romac romac commented May 18, 2023

This PR targets #3341


Controlled via the max_concurrency setting in the chain configuration.

… the chain

Controlled via the `max_concurrency` setting in the chain configuration.
@romac romac requested a review from ancazamfir May 18, 2023 13:28
@romac romac marked this pull request as draft May 18, 2023 13:31
@romac
Copy link
Member Author

romac commented May 18, 2023

I should probably use a CondVar + Mutex here instead of pulling in resevents. Will get to it later.

@romac
Copy link
Member Author

romac commented May 19, 2023

Let's switch to std-semaphore

@romac romac marked this pull request as ready for review May 22, 2023 09:15
@romac romac merged commit 1aa4f81 into romac/remove-runtime May 23, 2023
@romac romac deleted the romac/max-conc-queries branch May 23, 2023 13:56
Comment on lines +76 to +77
// If that number was specified as 0, then we use the maximum amount of concurrency,
// and effectively disable the limit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this fact be mentioned in the config.toml for the max_concurrency parameter?

Copy link
Member Author

@romac romac May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good catch! Maybe with a warning that doing this may completely overload the node.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanchen1991 seanchen1991 mentioned this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants